package main

import (
	"io"
	"net/http"
)

func main() {
	// 绑定请求和处理函数
	http.HandleFunc("/user/login",
		func(w http.ResponseWriter, r *http.Request) {
			// 数据库操作、逻辑处理、restapi json/xml返回
			io.WriteString(w, "hello!!!")
		})
		
	// 启动web服务器
	http.ListenAndServe(":8080", nil)
	// curl http://localhost:8080/user/login
	// hello!!!
}
